function r(url,callback,data,method){
    method=method || "post"

    var xmlHttp=new XMLHttpRequest;
    xmlHttp.open(method,url);
    xmlHttp.setRequestHeader("content-type","application/x-www-form-urlencoded");
    xmlHttp.send(data);
    xmlHttp.onreadystatechange=function(){
        if(xmlHttp.readyState===4 && xmlHttp.status===200){
            var data=xmlHttp.responseText;
            var jdata=JSON.parse(data)
            callback(jdata)
        }
    }
}